<?php

namespace app\admin\model;

use think\Model;

/**
 * 社群推送记录
 * @package app\admin\model
 */
class ResourcePushLog extends Model
{
    /**
     * 统计社群推送记录
     * @param $where
     * @return int
     */
    public static function countResourcePushLog($where)
    {
        return self::where($where)->count();
    }

    /**
     * 社群推送记录
     * @param $where
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function getResourcePushLog($where)
    {
        $data = self::where($where)->select();
        return $data ? $data->toArray() : [];
    }


}